<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .active{
            color: red;
        }
    </style>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="(item,index) in moves" :key="item" :class="{active:curryindex === index}" @click="itemli(index)">{{item}}</li>
        </ul>
    </div>
</body>
<script src='../js/vue.js'></script>
<script>
    let app = new Vue({
        el: '#app',
        data: {
             msg:'hello vue.js',
             moves: ['海王','海贼王','加勒比海盗','NBA','海尔兄弟'],
             curryindex:0
        },
        methods: {
            itemli(index){
                this.curryindex = index
            }
        }
    })
</script>
</html>